package com.lanyam.travel.base.dao;


import com.lanyam.travel.base.entity.DistrRecord;
import com.lanyam.travel.base.entity.vo.DistrRecordVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;


@Mapper
public interface DistrRecordMapper extends BaseMapper<DistrRecord>  {

    /**
     * 分页查询
     */
    Page<DistrRecordVo> getPage(@Param("page") IPage<DistrRecordVo> page, @Param("map") Map<String, Object> map);

    /**
     * 删除数据
     */
    void delById(String id);

    /**
     * 查询团队分销数据
     * @param teamId
     * @return
     */
    List<DistrRecordVo> getDistrRecordByTeamId(String teamId);

    /**
     * 根据订单id获取分销列表
     * @param orderId
     * @return
     */
    List<DistrRecordVo> getListByOrderId(String orderId);

    /**
     * 根据订单id获取分销列表
     * @param orderDetailId
     * @return
     */
    List<DistrRecordVo> getListByOrderDetailId(String orderDetailId);
}